Integrand size = 17, antiderivative size = 155 \[ \int e^{x^2} \sin \left (a+b x+c x^2\right ) \, dx=-\frac {i e^{-i \left (a-\frac {b^2}{4 i+4 c}\right )} \sqrt {\pi } \text {erfi}\left (\frac {i b-2 (1-i c) x}{2 \sqrt {1-i c}}\right )}{4 \sqrt {1-i c}}-\frac {i e^{i a+\frac {b^2}{4 (1+i c)}} \sqrt {\pi } \text {erfi}\left (\frac {i b+2 (1+i c) x}{2 \sqrt {1+i c}}\right )}{4 \sqrt {1+i c}} \]
[Out]
Time = 0.24 (sec) , antiderivative size = 155, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.176, Rules used = {4560, 2266, 2235} \[ \int e^{x^2} \sin \left (a+b x+c x^2\right ) \, dx=-\frac {i \sqrt {\pi } e^{-i \left (a-\frac {b^2}{4 c+4 i}\right )} \text {erfi}\left (\frac {i b-2 (1-i c) x}{2 \sqrt {1-i c}}\right )}{4 \sqrt {1-i c}}-\frac {i \sqrt {\pi } e^{i a+\frac {b^2}{4 (1+i c)}} \text {erfi}\left (\frac {i b+2 (1+i c) x}{2 \sqrt {1+i c}}\right )}{4 \sqrt {1+i c}} \]
[In]
[Out]
Rule 2235
Rule 2266
Rule 4560
Rubi steps \begin{align*} \text {integral}& = \int \left (\frac {1}{2} i e^{-i a-i b x+(1-i c) x^2}-\frac {1}{2} i e^{i a+i b x+(1+i c) x^2}\right ) \, dx \\ & = \frac {1}{2} i \int e^{-i a-i b x+(1-i c) x^2} \, dx-\frac {1}{2} i \int e^{i a+i b x+(1+i c) x^2} \, dx \\ & = -\left (\frac {1}{2} \left (i e^{i a+\frac {b^2}{4 (1+i c)}}\right ) \int \exp \left (\frac {(i b+2 (1+i c) x)^2}{4 (1+i c)}\right ) \, dx\right )+\frac {1}{2} \left (i e^{-i \left (a-\frac {b^2}{4 i+4 c}\right )}\right ) \int \exp \left (\frac {(-i b+2 (1-i c) x)^2}{4 (1-i c)}\right ) \, dx \\ & = -\frac {i e^{-i \left (a-\frac {b^2}{4 i+4 c}\right )} \sqrt {\pi } \text {erfi}\left (\frac {i b-2 (1-i c) x}{2 \sqrt {1-i c}}\right )}{4 \sqrt {1-i c}}-\frac {i e^{i a+\frac {b^2}{4 (1+i c)}} \sqrt {\pi } \text {erfi}\left (\frac {i b+2 (1+i c) x}{2 \sqrt {1+i c}}\right )}{4 \sqrt {1+i c}} \\ \end{align*}
Time = 0.44 (sec) , antiderivative size = 165, normalized size of antiderivative = 1.06 \[ \int e^{x^2} \sin \left (a+b x+c x^2\right ) \, dx=-\frac {(-1)^{3/4} e^{\frac {i b^2}{4 i-4 c}} \sqrt {\pi } \left ((-i+c) \sqrt {i+c} e^{\frac {i b^2 c}{2+2 c^2}} \text {erfi}\left (\frac {(-1)^{3/4} (b+2 (i+c) x)}{2 \sqrt {i+c}}\right ) (\cos (a)-i \sin (a))+\sqrt {-i+c} (i+c) \text {erfi}\left (\frac {\sqrt [4]{-1} (b+2 (-i+c) x)}{2 \sqrt {-i+c}}\right ) (-i \cos (a)+\sin (a))\right )}{4 \left (1+c^2\right )} \]
[In]
[Out]
Time = 0.36 (sec) , antiderivative size = 129, normalized size of antiderivative = 0.83
method | result | size |
risch | \(\frac {i \sqrt {\pi }\, {\mathrm e}^{-\frac {4 a c -4 i a -b^{2}}{4 \left (i c +1\right )}} \operatorname {erf}\left (-\sqrt {-i c -1}\, x +\frac {i b}{2 \sqrt {-i c -1}}\right )}{4 \sqrt {-i c -1}}+\frac {i \sqrt {\pi }\, {\mathrm e}^{\frac {4 a c +4 i a -b^{2}}{4 i c -4}} \operatorname {erf}\left (\sqrt {i c -1}\, x +\frac {i b}{2 \sqrt {i c -1}}\right )}{4 \sqrt {i c -1}}\) | \(129\) |
[In]
[Out]
none
Time = 0.26 (sec) , antiderivative size = 161, normalized size of antiderivative = 1.04 \[ \int e^{x^2} \sin \left (a+b x+c x^2\right ) \, dx=-\frac {\sqrt {\pi } {\left (c - i\right )} \sqrt {i \, c - 1} \operatorname {erf}\left (-\frac {{\left (b c + 2 \, {\left (c^{2} + 1\right )} x - i \, b\right )} \sqrt {i \, c - 1}}{2 \, {\left (c^{2} + 1\right )}}\right ) e^{\left (\frac {i \, b^{2} c - 4 i \, a c^{2} + b^{2} - 4 i \, a}{4 \, {\left (c^{2} + 1\right )}}\right )} - \sqrt {\pi } {\left (c + i\right )} \sqrt {-i \, c - 1} \operatorname {erf}\left (\frac {{\left (b c + 2 \, {\left (c^{2} + 1\right )} x + i \, b\right )} \sqrt {-i \, c - 1}}{2 \, {\left (c^{2} + 1\right )}}\right ) e^{\left (\frac {-i \, b^{2} c + 4 i \, a c^{2} + b^{2} + 4 i \, a}{4 \, {\left (c^{2} + 1\right )}}\right )}}{4 \, {\left (c^{2} + 1\right )}} \]
[In]
[Out]
\[ \int e^{x^2} \sin \left (a+b x+c x^2\right ) \, dx=\int e^{x^{2}} \sin {\left (a + b x + c x^{2} \right )}\, dx \]
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 475 vs. \(2 (101) = 202\).
Time = 0.24 (sec) , antiderivative size = 475, normalized size of antiderivative = 3.06 \[ \int e^{x^2} \sin \left (a+b x+c x^2\right ) \, dx=\frac {\sqrt {\pi } \sqrt {2 \, c^{2} + 2} {\left ({\left (\cos \left (-\frac {b^{2} c - 4 \, a c^{2} - 4 \, a}{4 \, {\left (c^{2} + 1\right )}}\right ) e^{\left (\frac {b^{2}}{4 \, {\left (c^{2} + 1\right )}}\right )} - i \, e^{\left (\frac {b^{2}}{4 \, {\left (c^{2} + 1\right )}}\right )} \sin \left (-\frac {b^{2} c - 4 \, a c^{2} - 4 \, a}{4 \, {\left (c^{2} + 1\right )}}\right )\right )} \operatorname {erf}\left (-\frac {2 \, {\left (-i \, c + 1\right )} x - i \, b}{2 \, \sqrt {i \, c - 1}}\right ) - {\left (\cos \left (-\frac {b^{2} c - 4 \, a c^{2} - 4 \, a}{4 \, {\left (c^{2} + 1\right )}}\right ) e^{\left (\frac {b^{2}}{4 \, {\left (c^{2} + 1\right )}}\right )} + i \, e^{\left (\frac {b^{2}}{4 \, {\left (c^{2} + 1\right )}}\right )} \sin \left (-\frac {b^{2} c - 4 \, a c^{2} - 4 \, a}{4 \, {\left (c^{2} + 1\right )}}\right )\right )} \operatorname {erf}\left (-\frac {2 \, {\left (-i \, c - 1\right )} x - i \, b}{2 \, \sqrt {-i \, c - 1}}\right )\right )} \sqrt {\sqrt {c^{2} + 1} + 1} - \sqrt {\pi } \sqrt {2 \, c^{2} + 2} {\left ({\left (-i \, \cos \left (-\frac {b^{2} c - 4 \, a c^{2} - 4 \, a}{4 \, {\left (c^{2} + 1\right )}}\right ) e^{\left (\frac {b^{2}}{4 \, {\left (c^{2} + 1\right )}}\right )} - e^{\left (\frac {b^{2}}{4 \, {\left (c^{2} + 1\right )}}\right )} \sin \left (-\frac {b^{2} c - 4 \, a c^{2} - 4 \, a}{4 \, {\left (c^{2} + 1\right )}}\right )\right )} \operatorname {erf}\left (-\frac {2 \, {\left (-i \, c + 1\right )} x - i \, b}{2 \, \sqrt {i \, c - 1}}\right ) + {\left (-i \, \cos \left (-\frac {b^{2} c - 4 \, a c^{2} - 4 \, a}{4 \, {\left (c^{2} + 1\right )}}\right ) e^{\left (\frac {b^{2}}{4 \, {\left (c^{2} + 1\right )}}\right )} + e^{\left (\frac {b^{2}}{4 \, {\left (c^{2} + 1\right )}}\right )} \sin \left (-\frac {b^{2} c - 4 \, a c^{2} - 4 \, a}{4 \, {\left (c^{2} + 1\right )}}\right )\right )} \operatorname {erf}\left (-\frac {2 \, {\left (-i \, c - 1\right )} x - i \, b}{2 \, \sqrt {-i \, c - 1}}\right )\right )} \sqrt {\sqrt {c^{2} + 1} - 1}}{8 \, {\left (c^{2} + 1\right )}} \]
[In]
[Out]
\[ \int e^{x^2} \sin \left (a+b x+c x^2\right ) \, dx=\int { e^{\left (x^{2}\right )} \sin \left (c x^{2} + b x + a\right ) \,d x } \]
[In]
[Out]
Timed out. \[ \int e^{x^2} \sin \left (a+b x+c x^2\right ) \, dx=\int \sin \left (c\,x^2+b\,x+a\right )\,{\mathrm {e}}^{x^2} \,d x \]
[In]
[Out]